<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  var callback = function(){
    console.log('callback');
  };
  var timer1 = window.setTimeout(callback, 2000);
  var timer2 = window.setTimeout(callback, 8000);
</script>
</body>
</html>